Execution replay is a technique that enables reconstruction of a past execution of a system. In conjunction with a checkpoint of the system state, the execution replay provides the ability to reconstruct the entire state at any point in time over a replay interval. The execution replay has many important applications, including debugging, fault-tolerance, and security.
Sharing memory between processes (including virtual machines) on the same machine can be used to provide a fast communication path between the processes. However, to log data read from the shared memory, the shared memory is read protected during a record/replay mode execution of a virtual machine. Hence, every write or read of a shared memory region causes a page fault to enable logging of data through a page fault handler. Since most CPU instructions typically write data into a shared memory region in small denomination, this sharing of memory becomes prohibitively costly due to a large volume of page faults to exchange even a few mega bytes of data.
During a recording and a replaying of CPU instructions, a state of the execution events in the machine needs to managed and validated. This overhead of managing and validating the execution events causes the performance of the system to degrade. Also, the deterministic replay makes it necessary to ensure an ordering of dependent events under recording and replaying so that identical outputs are obtained from the machine or identical execution paths are followed by the machine at all execution branch points. This ordering mechanism causes further slow down of the deterministic replay process.
Thus, there is a need for methods and systems for a fast and replayable (i.e., capable of being efficiently replayed through execution replay techniques) inter process communication among various processes including virtual machines.